<template>
 <view class="flex-col flex-auto group_3 space-y-12">
   <view class="flex-col justify-start items-start relative group_4">
     <view class="flex-col justify-start items-end relative group_5">
       <view class="section_2"></view>
       <view class="section pos"></view>
     </view>
     <image
       class="image_5 pos_3"
       src="https://codefun-proj-user-res-1256085488.cos.ap-guangzhou.myqcloud.com/648fef445a7e3f0310275929/648ff5ec726ab50011f26fbc/16872629522190245472.png"
     />
     <view class="flex-col justify-start items-end group_6 pos_2">
       <view class="section_3"></view>
       <text class="text pos_4">下午好，{{ name }}</text>
       <text class="font_1 pos_5">{{email}}</text>
     </view>
   </view>
   <view class="flex-col relative group">
     <view class="flex-col space-y-44">
       <view class="flex-col justify-start items-start">
         <view class="flex-row equal-division space-x-22">
           <view class="flex-col items-center equal-division-item space-y-12">
             <text class="font_2">{{Point }}</text>
             <text class="font_1">可用积分</text>
           </view>
           <view class="flex-col items-center equal-division-item space-y-12">
             <text class="font_2">10</text>
             <text class="font_1">优惠券</text>
           </view>
           <view class="flex-col items-center equal-division-item space-y-12">
             <text class="font_2 text_2">{{province}}</text>
             <text class="font_1">地区</text>
           </view>
         </view>
       </view>
       <image
         class="self-start image_7"
         src="https://codefun-proj-user-res-1256085488.cos.ap-guangzhou.myqcloud.com/648fef445a7e3f0310275929/648ff5ec726ab50011f26fbc/2f9342b661894647bdb2ed234a728f83.png"
       />
     </view>
     <view class="flex-col group_11 space-y-24">
       <view class="flex-row justify-between items-center" @click="ToSearchRecord()">
         <view class="flex-row items-center space-x-12">
           <image
             class="shrink-0 image_2"
             src="https://codefun-proj-user-res-1256085488.cos.ap-guangzhou.myqcloud.com/648fef445a7e3f0310275929/648ff5ec726ab50011f26fbc/16872629522353151764.png"
           />
           <text class="font_5">积分变更记录</text>
         </view>
         <image
           class="image_10"
           src="https://codefun-proj-user-res-1256085488.cos.ap-guangzhou.myqcloud.com/648fef445a7e3f0310275929/648ff5ec726ab50011f26fbc/16872629522326847635.png"
         />
       </view>
       <view class="flex-row justify-between items-center" @click="ToChangeInf()">
         <view class="flex-row items-center space-x-12">
           <image
             class="shrink-0 image_2"
             src="https://codefun-proj-user-res-1256085488.cos.ap-guangzhou.myqcloud.com/648fef445a7e3f0310275929/648ff5ec726ab50011f26fbc/16872629526231402600.png"
           />
           <text class="font_5">个人设置</text>
         </view>
         <image
           class="image_10"
           src="https://codefun-proj-user-res-1256085488.cos.ap-guangzhou.myqcloud.com/648fef445a7e3f0310275929/648ff5ec726ab50011f26fbc/16872629522326847635.png"
         />
       </view>
     </view>
     <view class="flex-col pos_6">
       <view class="flex-col justify-start items-center relative group_7">
         <view class="flex-row items-start section_4 space-x-25">
           <view class="section_5"></view>
           <view class="flex-row space-x-8">
             <view class="flex-col group_8 space-y-6">
               <text class="text_3">尊享20余项特权</text>
               <view class="flex-col justify-start text-wrapper_2">
                 <text class="font_3 text_5">新人首月入会仅需9元</text>
               </view>
             </view>
             <view class="flex-col justify-start items-center text-wrapper"><text class="text_4">GO</text></view>
           </view>
         </view>
         <image
           class="image_6 pos_7"
           src="https://codefun-proj-user-res-1256085488.cos.ap-guangzhou.myqcloud.com/648fef445a7e3f0310275929/648ff5ec726ab50011f26fbc/16872629522239117340.png"
         />
       </view>
       <view class="flex-row justify-between items-center group view">
         <text class="font_4">我的订单</text>
         <view class="flex-row">
           <text class="font_3 text_6">全部</text>
           <image
             class="shrink-0 image_8"
             src="https://codefun-proj-user-res-1256085488.cos.ap-guangzhou.myqcloud.com/648fef445a7e3f0310275929/648ff5ec726ab50011f26fbc/16872629522301360830.png"
           />
         </view>
       </view>
       <view class="flex-row equal-division_2 space-x-12">
         <view class="flex-col items-center equal-division-item_2 space-y-8">
           <image
             class="image_9"
             src="https://codefun-proj-user-res-1256085488.cos.ap-guangzhou.myqcloud.com/648fef445a7e3f0310275929/648ff5ec726ab50011f26fbc/d3ce9887cd446e1ce85586f5c688f12a.png"
           />
           <text class="font_3">已付款</text>
         </view>
         <view class="flex-col items-center equal-division-item_2 space-y-8">
           <image
             class="image_9"
             src="https://codefun-proj-user-res-1256085488.cos.ap-guangzhou.myqcloud.com/648fef445a7e3f0310275929/648ff5ec726ab50011f26fbc/5246cee4f11f4561a84f2be30bcb2ee9.png"
           />
           <text class="font_3">待付款</text>
         </view>
         <view class="flex-col items-center equal-division-item_2 space-y-8">
           <image
             class="image_9"
             src="https://codefun-proj-user-res-1256085488.cos.ap-guangzhou.myqcloud.com/648fef445a7e3f0310275929/648ff5ec726ab50011f26fbc/fd0de6bed38dbb1afb5b74867e1bc5ca.png"
           />
           <text class="font_3">待配送</text>
         </view>
         <view class="flex-col items-center equal-division-item_2 space-y-8">
           <image
             class="image_9"
             src="https://codefun-proj-user-res-1256085488.cos.ap-guangzhou.myqcloud.com/648fef445a7e3f0310275929/648ff5ec726ab50011f26fbc/27c1c4f80ffd65ea8db5f4e6a4c98d72.png"
           />
           <text class="font_3">我的退款</text>
         </view>
       </view>
       <view class="flex-row justify-between items-center group view_2">
         <view class="flex-col justify-start items-start relative group_9">
           <view class="flex-col items-start space-y-74">
             <text class="font_4">常用工具</text>
             <image
               class="image_11"
               src="https://codefun-proj-user-res-1256085488.cos.ap-guangzhou.myqcloud.com/648fef445a7e3f0310275929/648ff5ec726ab50011f26fbc/d2e33d4906ccc9dd79b817e295b32332.png"
             />
           </view>
           <view class="flex-row items-center space-x-12 pos_8">
             <image
               class="shrink-0 image_2"
               src="https://codefun-proj-user-res-1256085488.cos.ap-guangzhou.myqcloud.com/648fef445a7e3f0310275929/648ff5ec726ab50011f26fbc/16872629522332733350.png"
             />
             <text class="font_5">我的地址</text>
           </view>
         </view>
         <image
           class="image_10"
           src="https://codefun-proj-user-res-1256085488.cos.ap-guangzhou.myqcloud.com/648fef445a7e3f0310275929/648ff5ec726ab50011f26fbc/16872629522326847635.png"
         />
       </view>
     </view>
     <view class="flex-row justify-between items-center group_10 pos_9">
       <text class="font_5">账户资产</text>
       <image
         class="image_10"
         src="https://codefun-proj-user-res-1256085488.cos.ap-guangzhou.myqcloud.com/648fef445a7e3f0310275929/648ff5ec726ab50011f26fbc/16872629522326847635.png"
       />
     </view>
   </view>
 </view>
</template>

<script>
	// const moment = require('moment');
	import md5 from 'js-md5';
	import {memberGet} from '../../api/index.js'//引入会员详情查询接口
	// const miniProgramAppid = 'wx5183451345781ce6';
	export default {
		data() {
			return {
				isRegister: false,
				username: '',
				region: '',
				province:'',
				gender: '',
				email: '',
				name: '',
				Point:0,
				
			}
		},
		methods: {
			ToChangeInf(){
				uni.navigateTo({
					url: '/pages/editUser/changeInf'
				})
				
			},
			ToSearchRecord() {
				uni.navigateTo({
					url: '/pages/searchRecord/searchRecord'
				})
			},
			
			get() {
				uni.showLoading({
					title: '加载中...'
				});
				memberGet({
					  "memberId": uni.getStorageSync("memberId")
				}).then(res => {
						uni.hideLoading();
						this.isRegister = true;
						this.name = res.data.data.name;
						this.Point = res.data.data.point;
						this.province=res.data.data.address.province;
						this.gender=res.data.data.gender;
						this.email=res.data.data.email;
						this.username=res.data.data.name;
				})
				.catch(res => {
						uni.showToast({
							title: '请先注册',
							icon: 'none',
							duration: 2000
						})
				})
			},
			onShow() {
				this.get()
				// console.log(uni.getStorageSync("memberId"))
			}
			
		}
	}
</script>

<style lang="scss">
  .group_3 {
    padding-bottom: 168rpx;
    overflow-y: auto;
    .group_4 {
      padding-bottom: 20rpx;
      .group_5 {
        padding-bottom: 180rpx;
        width: 578rpx;
        .section_2 {
          background-color: #c6ffbf7a;
          filter: blur(119rpx);
          border-radius: 0 0 50% 50%;
          width: 360rpx;
          height: 32rpx;
        }
        .section {
          filter: blur(29rpx);
          background-image: url('https://codefun-proj-user-res-1256085488.cos.ap-guangzhou.myqcloud.com/648fef445a7e3f0310275929/648ff5ec726ab50011f26fbc/afd5c83e4aee46a87f470130d624d294.png');
          background-size: 100% 100%;
          width: 358rpx;
          height: 212rpx;
        }
        .pos {
          position: absolute;
          left: 0;
          top: 0;
        }
      }
      .image_5 {
        border-radius: 50%;
        width: 144rpx;
        height: 144rpx;
      }
      .pos_3 {
        position: absolute;
        left: 32rpx;
        bottom: 30rpx;
      }
      .group_6 {
        width: 540rpx;
        .section_3 {
          background-color: #f5ff3a30;
          filter: blur(246rpx);
          border-radius: 0px 0 0 50%px;
          width: 332rpx;
          height: 232rpx;
        }
        .text {
          color: #000000;
          font-size: 48rpx;
          font-family: SourceHanSansCN;
          font-weight: 700;
          line-height: 48rpx;
        }
        .pos_4 {
          position: absolute;
          left: 0;
          top: 80rpx;
        }
        .pos_5 {
          position: absolute;
          left: 0;
          bottom: 46rpx;
        }
      }
      .pos_2 {
        position: absolute;
        right: 0;
        top: 0;
      }
    }
    .group {
      padding: 0 32rpx;
      .space-y-44 {
        & > view:not(:first-child),
        & > text:not(:first-child),
        & > image:not(:first-child) {
          margin-top: 88rpx;
        }
        .equal-division {
          margin-left: 4rpx;
          .equal-division-item {
            padding-bottom: 8rpx;
            width: 181rpx;
            .font_2 {
              font-size: 48rpx;
              font-family: DDin;
              line-height: 34rpx;
              font-weight: 700;
              color: #000000;
            }
            .text_2 {
              color: #1d5245;
            }
          }
        }
        .space-x-22 {
          & > view:not(:first-child),
          & > text:not(:first-child),
          & > image:not(:first-child) {
            margin-left: 44rpx;
          }
        }
        .image_7 {
          box-shadow: 4rpx 8rpx 16rpx #30201840;
          border-radius: 40rpx;
          width: 112rpx;
          height: 52rpx;
        }
      }
      .group_11 {
        margin-top: 642rpx;
      }
      .space-y-24 {
        & > view:not(:first-child),
        & > text:not(:first-child),
        & > image:not(:first-child) {
          margin-top: 48rpx;
        }
      }
      .pos_6 {
        position: absolute;
        left: 0;
        right: 0;
        top: 0;
        .group_7 {
          padding: 164rpx 0 60rpx;
          .section_4 {
            padding-left: 54rpx;
            padding-right: 22rpx;
            background-image: url('https://codefun-proj-user-res-1256085488.cos.ap-guangzhou.myqcloud.com/648fef445a7e3f0310275929/648ff5ec726ab50011f26fbc/16872629526479446959.png');
            background-size: 100% 100%;
            background-repeat: no-repeat;
            .section_5 {
              margin-top: 28rpx;
              background-image: linear-gradient(180deg, #b5895b -37.5%, #82603e 137.5%);
              border-radius: 40rpx;
              width: 126rpx;
              height: 72rpx;
            }
            .space-x-8 {
              & > view:not(:first-child),
              & > text:not(:first-child),
              & > image:not(:first-child) {
                margin-left: 16rpx;
              }
              .group_8 {
                margin-top: 6rpx;
                .text_3 {
                  color: transparent;
                  font-size: 40rpx;
                  font-family: SourceHanSansCN;
                  font-weight: 700;
                  line-height: 38rpx;
                  background-image: linear-gradient(90deg, #e0cc83 0%, #c4a56c 100%);
                  -webkit-background-clip: text;
                }
                .text-wrapper_2 {
                  margin-right: 12rpx;
                  padding: 4rpx 0;
                  background-color: #120c06;
                  border-radius: 16rpx;
                  .text_5 {
                    margin-left: 28rpx;
                    margin-right: 24rpx;
                    color: #958f6d;
                  }
                }
              }
              .space-y-6 {
                & > view:not(:first-child),
                & > text:not(:first-child),
                & > image:not(:first-child) {
                  margin-top: 12rpx;
                }
              }
              .text-wrapper {
                padding: 24rpx 0;
                background-image: linear-gradient(180deg, #e4d09e 0%, #c7af6e 100%);
                border-radius: 50%;
                width: 88rpx;
                height: 88rpx;
                border: solid 4rpx #dfcc97;
                .text_4 {
                  color: #61351d;
                  font-size: 36rpx;
                  font-family: SourceHanSansCN;
                  line-height: 28rpx;
                }
              }
            }
          }
          .space-x-25 {
            & > view:not(:first-child),
            & > text:not(:first-child),
            & > image:not(:first-child) {
              margin-left: 50rpx;
            }
          }
          .image_6 {
            filter: drop-shadow(8rpx 4rpx 8rpx #1f161140);
            width: 164rpx;
            height: 138rpx;
          }
          .pos_7 {
            position: absolute;
            left: 48rpx;
            bottom: 58rpx;
          }
        }
        .view {
          margin-top: 4rpx;
        }
        .equal-division_2 {
          margin-top: 28rpx;
          padding: 0 34rpx;
          .equal-division-item_2 {
            flex: 1 1 170rpx;
            padding: 8rpx 0;
            .image_9 {
              width: 112rpx;
              height: 112rpx;
            }
          }
          .space-y-8 {
            & > view:not(:first-child),
            & > text:not(:first-child),
            & > image:not(:first-child) {
              margin-top: 16rpx;
            }
          }
        }
        .view_2 {
          margin-top: 44rpx;
        }
      }
      .font_4 {
        font-size: 32rpx;
        font-family: SourceHanSansCN;
        line-height: 30rpx;
        font-weight: 700;
        color: #000000;
      }
      .font_3 {
        font-size: 24rpx;
        font-family: SourceHanSansCN;
        line-height: 22rpx;
        color: #000000b3;
      }
      .text_6 {
        color: #00000080;
      }
      .image_8 {
        width: 24rpx;
        height: 24rpx;
      }
      .space-x-12 {
        & > view:not(:first-child),
        & > text:not(:first-child),
        & > image:not(:first-child) {
          margin-left: 24rpx;
        }
        .image_2 {
          width: 48rpx;
          height: 48rpx;
        }
      }
      .group_9 {
        width: 189rpx;
        .space-y-74 {
          & > view:not(:first-child),
          & > text:not(:first-child),
          & > image:not(:first-child) {
            margin-top: 148rpx;
          }
          .image_11 {
            width: 44rpx;
            height: 36rpx;
          }
        }
        .pos_8 {
          position: absolute;
          left: 0;
          right: 0;
          top: 78rpx;
        }
      }
      .image_10 {
        width: 32rpx;
        height: 32rpx;
      }
      .group_10 {
        width: 613rpx;
      }
      .pos_9 {
        position: absolute;
        right: 32rpx;
        top: 790rpx;
      }
      .font_5 {
        font-size: 28rpx;
        font-family: SourceHanSansCN;
        line-height: 26rpx;
        color: #000000;
      }
    }
    .font_1 {
      font-size: 28rpx;
      font-family: SourceHanSansCN;
      line-height: 26rpx;
      color: #000000b3;
    }
  }
  .space-y-12 {
    & > view:not(:first-child),
    & > text:not(:first-child),
    & > image:not(:first-child) {
      margin-top: 24rpx;
    }
  }
  .space-y-12 {
    & > view:not(:first-child),
    & > text:not(:first-child),
    & > image:not(:first-child) {
      margin-top: 24rpx;
    }
  }
  .space-y-12 {
    & > view:not(:first-child),
    & > text:not(:first-child),
    & > image:not(:first-child) {
      margin-top: 24rpx;
    }
  }
  .space-y-12 {
    & > view:not(:first-child),
    & > text:not(:first-child),
    & > image:not(:first-child) {
      margin-top: 24rpx;
    }
  }
</style>